/**
 * Get runner history for the given username and runType. 
 * If username is not provided, get runner details for the current user.
 * 
 * @param args.username
 * @param args.runType
 */
function main(){
	var username = args.username;
	var runType = args.runType;
	if(runType == null || runType == ""){
		runType = "ALL";
	}
	var history;
	var runner;
	if(username != null && username != ""){
		history = jsRunnerService.getHistoryByRunType(username, runType);
		runner = jsRunnerService.getRunner(username);
	}
	else{
		history = jsRunnerService.getCurrentHistoryByRunType(runType);
		runner = jsRunnerService.getCurrentRunner();
	}
	//TODO test if history is not null
	model.history = history;
	model.runner = runner;
}
main();